package com.copa.gamestore.module.gameNews.schedule;

import com.copa.gamestore.module.gameNews.application.GameNewsApplicationService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author copa
 * @createDate 2022-09-25 21:05
 * @function
 */
@Component
public class GameNewsSchedule {

    @Resource
    private GameNewsApplicationService gameNewsApplicationService;


    //@Scheduled(fixedDelay = 60 * 60 * 24 * 1000L)
    @Scheduled(cron = "0 0 0 * * ?")
    public void gameNewsTask() {
        gameNewsApplicationService.gameNewsTask();
    }
}
